import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/course",
    name: "course",
    component: () =>
      import(/* webpackChunkName: "course" */ "../views/CourseView.vue"),
  },
  {
    path: "/school",
    name: "school",
    component: () =>
      import(/* webpackChunkName: "school" */ "../views/SchoolView.vue"),
  },
  {
    path: "/live",
    component: () =>
      import(/* webpackChunkName: "live" */ "../views/LiveView.vue"),
    children: [
      {
        path: "",
        component: () =>
          import(/* webpackChunkName: "dcone" */ "../views/DCOne.vue"),
      },
      {
        path: "dctwo",
        component: () =>
          import(/* webpackChunkName: "dctwo" */ "../views/DCTwo.vue"),
      },
      {
        path: "dcthree",
        component: () =>
          import(/* webpackChunkName: "dcthree" */ "../views/DCThree.vue"),
      },
    ],
  },
  {
    path: "/comm",
    name: "comm",
    component: () =>
      import(/* webpackChunkName: "comm" */ "../views/CommView.vue"),
  },
  {
    path: "/thanks",
    name: "thanks",
    component: () =>
      import(/* webpackChunkName: "thanks" */ "../views/AllThanksView.vue"),
  },
  {
    path: "/thanks_detail",
    name: "thanks_detail",
    component: () =>
      import(
        /* webpackChunkName: "thanks_detail" */ "../views/ThanksDetailView.vue"
      ),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
